File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 1- const pkg = require ( "./ package.json" ) ;
2- const themeName = pkg . name || "ioptheme" ;
1+ import { readPackageUp } from "read- package-up" ;
2+ const themeName = ( await readPackageUp ( ) ) . packageJson . name ;
33
4- module . exports = {
4+ export default {
55 src : `./wp-content/themes/${ themeName } /src` ,
66 dist : `./wp-content/themes/${ themeName } /dist` ,
7- entry : [
8- "./js/main.js" ,
9- "./js/admin.js" ,
10- "./js/editor.js" ,
11- "./sass/main.scss" ,
12- ] ,
13- publicPath : `/wp-content/themes/${ themeName } /dist/` ,
147
15- // enable polling on Windows (no iNotify events), does `isWindows` work?
16- // This property can be a boolean or an integer > 250
17- // NOTE: iNotify events sometimes stop working on macOS, restart Docker to get them back
18- // usePolling: false,
8+ entry : [ "./js/main.js" , "./js/admin.js" , "./js/editor.js" ] ,
9+
10+ publicPath : `/wp-content/themes/${ themeName } /dist/` ,
1911
20- // OPTIONAL: Specify a Sass implementation, defaults to sass-embedded. Override with `sass` or `node-sass`.
21- // sass : "sass ",
12+ // sass: " sass-embedded",
13+ // esTarget : "es2020 ",
2214
23- // Set the webpack devtool option for sourcemaps
2415 devtool : "source-map" ,
2516} ;
You can’t perform that action at this time.
0 commit comments