refactor: move files to source dir
@ -14,7 +14,7 @@
|
|||||||
"node": ">=10.0.0",
|
"node": ">=10.0.0",
|
||||||
"yarn": ">=1.0.0"
|
"yarn": ">=1.0.0"
|
||||||
},
|
},
|
||||||
"main": "src/scripts/background.js",
|
"main": "source/scripts/background.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:chrome": "cross-env NODE_ENV=development cross-env TARGET_BROWSER=chrome webpack --watch",
|
"dev:chrome": "cross-env NODE_ENV=development cross-env TARGET_BROWSER=chrome webpack --watch",
|
||||||
"dev:firefox": "cross-env NODE_ENV=development cross-env TARGET_BROWSER=firefox webpack --watch",
|
"dev:firefox": "cross-env NODE_ENV=development cross-env TARGET_BROWSER=firefox webpack --watch",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -44,12 +44,12 @@ module.exports = {
|
|||||||
mode: nodeEnv,
|
mode: nodeEnv,
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
manifest: './src/manifest.json',
|
manifest: './source/manifest.json',
|
||||||
background: './src/scripts/background.js',
|
background: './source/scripts/background.js',
|
||||||
contentScript: './src/scripts/contentScript.js',
|
contentScript: './source/scripts/contentScript.js',
|
||||||
popup: './src/scripts/popup.js',
|
popup: './source/scripts/popup.js',
|
||||||
options: './src/scripts/options.js',
|
options: './source/scripts/options.js',
|
||||||
styles: ['./src/styles/popup.scss', './src/styles/options.scss'],
|
styles: ['./source/styles/popup.scss', './source/styles/options.scss'],
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
@ -71,7 +71,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /.(js|jsx)$/,
|
test: /.(js|jsx)$/,
|
||||||
include: [path.resolve(__dirname, 'src/scripts')],
|
include: [path.resolve(__dirname, 'source/scripts')],
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
@ -94,7 +94,7 @@ module.exports = {
|
|||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].css',
|
name: '[name].css',
|
||||||
context: './src/styles/',
|
context: './source/styles/',
|
||||||
outputPath: 'css/',
|
outputPath: 'css/',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -134,18 +134,18 @@ module.exports = {
|
|||||||
verbose: true,
|
verbose: true,
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'src/options.html',
|
template: 'source/options.html',
|
||||||
// inject: false,
|
// inject: false,
|
||||||
chunks: ['options'],
|
chunks: ['options'],
|
||||||
filename: 'options.html',
|
filename: 'options.html',
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'src/popup.html',
|
template: 'source/popup.html',
|
||||||
// inject: false,
|
// inject: false,
|
||||||
chunks: ['popup'],
|
chunks: ['popup'],
|
||||||
filename: 'popup.html',
|
filename: 'popup.html',
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin([{ from: 'src/assets', to: 'assets' }]),
|
new CopyWebpackPlugin([{ from: 'source/assets', to: 'assets' }]),
|
||||||
extensionReloaderPlugin,
|
extensionReloaderPlugin,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||